<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="renderer" content="webkit">
		<title>管理员管理</title>
		<import type='css' file="admin.pintuer4.css.pintuer" />
		<import type='css' file="admin.pintuer4.css.admin" />
		<link type="image/x-icon" href="http://www.pintuer.com/favicon.ico" rel="shortcut icon" />
		<link href="http://www.pintuer.com/favicon.ico" rel="bookmark icon" />
	</head>

	<body>
		<include file="Public:header" />
	<!--内容-->
	<div class="layout">
		<div class="admin">
		<form method="post">
	    <div class="panel admin-panel">
	    	<div class="panel-head"><strong>管理员列表</strong></div>
	        <div class="padding border-bottom">
	            <a class="button button-small border-green" href="{:U('Admin/admin_add')}" >添加管理员</a>
	        </div>
	        <table class="table table-hover">
	        	<tr><th>昵称</th><th>账号</th><th style="width: 40%;">角色</th><th>状态</th><th>操作</th></tr>
	        	<volist name="list" id="a">
	        	<tr>
		        	<td>{$a.name}</td>
		        	<td>{$a.account}</td>
		        	<td>{$a.role.name}</td>
		        	<td>
		        	<if condition="$a['state'] eq 1">启用</if>
		        	<if condition="$a['state'] eq 0">禁用</if>
		        	</td>
		        	<td>
		        	<a class="button border-blue button-little" href="{:U('Admin/admin_update')}?id={$a.id}">修改</a>
		        	<if condition="$a.menu_ids neq 'all'">
		        		<if condition="$a['state'] eq 1">
		        		<a class="button border-blue button-little" href="{:U('Admin/disable')}?id={$a.id}">禁用</a>
		        		</if>
		        		<if condition="$a['state'] eq 0">
		        		<a class="button border-blue button-little" href="{:U('Admin/enable')}?id={$a.id}">启用</a>
		        		</if>
			        	<a class="button border-yellow button-little" onclick="{if(confirm('确认删除?')){return true;}return false;}" href="{:U('Admin/admin_delete')}?id={$a.id}">删除</a>
					</if>
		        	</td>
	        	</tr>
	        	</volist>
	        </table>
	    </div>
	    </form>
	    </div>
	    </div>
		<!--底部-->
		
		<import type='js' file="admin.pintuer4.js.jquery" />
		<import type='js' file="admin.pintuer4.js.pintuer" />
		<import type='js' file="admin.pintuer4.js.respond" />
		<import type='js' file="admin.pintuer4.js.layer" />
		<import type='js' file="admin.pintuer4.js.admin" />
		<script>
			$(function() {
				
				//大于移动端800宽度才弹出提示
				if ($(window).width() >= 800) {
					layer.open({
						type: 1,
						shade: false,
						title: false, //不显示标题
						area: ['420px', '640px'],
						content: $('#alert-talk'), //捕获的元素
						cancel: function(index) {
							layer.close(index);
						}
					});
				}
			});
		</script>
	</body>

</html>